for a in range(1,10):
    for b in range(1,a+1):
        print(f"{a}*{b}={a*b}",end='\t')
    print()



n=1
while n <= 9:
    for m in range(1,n+1):
        print(f"{m}*{n}={n*m}",end="\t")
    print()
    n += 1

print('-----------------------------------------------')


n=0
sum=0
while n <= 10:
    if n % 2 == 0:
        sum = sum + n
    n+=1
print(sum)

print('----------------------------------------------')

for i in range(2,100):
    for l in range(2,i):
        if i % l == 0:
             break
    else:
        print(i)
print('---------------------------------------------')

for s1 in range(100,1000):
    a = s1//100
    b = s1//10%10
    c = s1%10
    if  a**3 + b**3 + c**3 == s1:
        print(s1)


print('--------------------------------------------')
s2=100
while s2 < 1000:
    a1 = s2 // 100
    b1 = s2 // 10 % 10
    c1 = s2 % 10
    if a1**3 + b1**3 + c1**3 == s2:
        print(s2)
    s2+=1

print('--------------------------------------------')
import math
a = float(input("输入参数a："))
b = float(input("输入参数b："))
c = float(input("输入参数c："))
if b**2 - 4*a*c > 0:
    x1 = (-b + math.sqrt( b**2 - 4*a*c )) / 2*a
    x2 = (-b - math.sqrt( b**2 - 4*a*c )) / 2*a
    print(f"根为{x1},{x2}")
elif b**2 - 4*a*c == 0:
    x = (-b + math.sqrt( b**2 - 4*a*c )) / 2*a
    print(f"根为{x}")
else:
    print("无解")
print('--------------------------------------------')
s1 = 'a'
print(ord(s1))
s2 = 'z'
print(ord(s2))
lowercase_letters = ""
for i in range(97, 123):
    lowercase_letters += chr(i)
# 输出大写的 Z - A
uppercase_letters = ""
for i in range(90, 64, -1):
    uppercase_letters += chr(i)
print("小写的 a - z:", lowercase_letters)
print("大写的 Z - A:", uppercase_letters)
print('-------------------------------------------')
n=0
if a % 2 != 0:
        n = n + ( ( -1 ) ** ( a + 1 ) ) * a
print("相加的和为：",n)

print('-------------------------------------------')

n=0
for a in range(1,101):
        n = n + ( ( -1 ) ** ( a + 1 ) ) *(1/a)
print("相加的和为：",n)

print('-------------------------------------------')









